﻿@model IEnumerable<MVCBlog.Entities.Models.CategoryInfo>

@{
    ViewBag.Title = "CategoryList";
    Layout = "~/Views/Shared/_AdminLayout.cshtml";
} 
<h2 class="sub-header">@ViewBag.Title</h2>
<hr />
<div class="row">
    <div class="col-md-4">
        <a href="@Url.Action("AddCategoryInfo")" class="btn btn-default" target="_blank">创建分类目录</a>
    </div>
</div>

<table class="table">
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.CategoryName)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.CreateTime)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.IsDelete)
        </th>
        <td>@Html.DisplayNameFor(model => model.CreateUser.Name)</td>
        <th></th>
    </tr>

    @foreach (var item in Model)
    {
        <tr>
            <td>
                @Html.DisplayFor(modelItem => item.CategoryName)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.CreateTime)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.IsDelete)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.CreateUser.Name)
            </td>
        </tr>
    }

</table>
